package net.lab1024.sa.admin.module.business.category.domain.entity;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class SynthesisNode {
    private String smiles;
    private int depth;
    private SynthesisNode parent;
    private boolean inStock;
    private double score;
    private List<SynthesisNode> children = new ArrayList<>();

    public void addChild(SynthesisNode child) {
        child.setParent(this);
        child.setDepth(this.depth + 1);
        this.children.add(child);
    }
}

